package com.emokili.ewa.app.feign;

import com.emokili.ewa.common.utils.R;
import com.emokili.ewa.common.vo.MemberRegisterVo;
import com.emokili.ewa.common.vo.MemberUpdateVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Description:
 * @Created: with IntelliJ IDEA.
 * @author: 夏沫止水
 * @createTime: 2020-06-27 17:10
 **/

@FeignClient("ewa-sso")
public interface AppFeignService {

    @PostMapping(value = "/ewa-sso-server/app/register")
    R register(@RequestBody MemberRegisterVo vo);

    @GetMapping(value = "/app/member/recaptcha")
    R recaptcha(@RequestParam String email);

    @GetMapping(value = "/ewa-sso-server/app/login")
    R login(@RequestParam String username,@RequestParam String password);

    @RequestMapping("/ewa-sso-server/app/logout")
    R logout(String sessionId);

    @PostMapping(value = "/app/member/update")
    R update(@RequestBody MemberUpdateVo memberUpdateVo);

    @GetMapping(value = "/app/member/token")
    R getUserByToken(@RequestParam String token);

    @RequestMapping(value = "/app/frame/bind")
    R bind(@RequestParam Long id,@RequestParam String serialNumber);
}
